#include <stdio.h>

int total = 0;

int rabbit(int born_year, int final_year)
{
	int child_year = born_year + 3;

	total += 1;

	while (child_year < final_year)
	{
		rabbit(child_year, final_year);
		child_year++;
	}
}

int main(void)
{
	int year;

	scanf("%d", &year);

	rabbit(0, year);
	
	printf("第%d年有%d只兔子\n", year, total);

	return 0;
}
